<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>项目阶段设置</title>
    <link rel="stylesheet" href="${re.contextPath}/plugin/layui/css/layui.css" media="all"/>
    <!--公用样式-->
    <link rel="stylesheet" href="${re.contextPath}/plugin/common/css/comment.css">
    <!--页面样式-->
    <link rel="stylesheet" href="${re.contextPath}/plugin/common/css/style.css">
    <link rel="stylesheet" href="${re.contextPath}/plugin/common/css/extended.css">
    <script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.all.js"></script>
    <script type="text/javascript" src="${re.contextPath}/plugin/jquery/jquery-3.2.1.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/comment.js"></script>
</head>
<body class="whitebg">
<div class="myDataCentere mydataCentere-small" style="text-align:center; height: 182px!important;">
        <ul class="clearfix">
            <li class="clearfix fl">
                <label>&nbsp;&nbsp;&nbsp;关键字</label>
                <input type="hidden" id="id" value="${itf.id}">
                <input id="search" name="search" value="${itf.searchKey}" type="text" placeholder="请输入关键字" >
            </li>
            <li class="clearfix fl">
                <label>说明信息</label>
                <input id="remark" name="remark" value="${itf.remark}" type="text" placeholder="请输入说明信息">
            </li>
        </ul>
</div>

<div style="background-color: white;background-color: white;padding: 15px;text-align: center;position: fixed;bottom: 1px;width: 100%;">
    <button class="layui-btn layui-btn-sm" lay-filter="submitStage" lay-submit type="button">确定</button>
    <button class="layui-btn layui-btn-primary layui-btn-sm" type="button" id="close">关闭</button>
</div>

<script type="text/javascript" src="${re.contextPath}/plugin/tools/tool.js"></script>
<script>
    layui.use(['form','layer'], function(){
        $ = layui.jquery;
        var form = layui.form
            ,layer = layui.layer;
        var pageFrom = localStorage.getItem("setjspage");
        $('#close').click(function(){
            var index = parent.layer.getFrameIndex(window.name);
            parent.layer.close(index);
        });
        //监听提交
        form.on('submit(submitStage)', function(data){
            var id = $('#id').val();
            var searchKey=$('#search').val();
            var remark= $('#remark').val();

            if(searchKey && searchKey.trim().length>128){
                layer.msg("输入长度不能大于128个字符！",{icon:2});
                return ;
            }

            if(searchKey && searchKey.trim().length>128){
                layer.msg("输入长度不能大于128个字符！",{icon:2});
                return ;
            }

            var json = {
                id: id,
                searchKey: searchKey,
                remark: remark
            }
            layerAjax('/it/file/searchingFile',json,'',function (d) {
                if(d.flag){
                    layer.msg(d.msg, {icon: 6});
                    if('1' == pageFrom){
                        setTimeout(function(){
                            parent.location.reload()
                        },1000);
                    }else if('2' == pageFrom){
                        setTimeout(function(){
                            var index = parent.layer.getFrameIndex(window.name);
                            parent.layer.close(index);
                        },1200);
                    }
                }else{
                    layer.msg(d.msg, {icon: 5});
                }
            })

            return false;
        });
    });
</script>
</body>
</html>